#coding=utf-8
import os, subprocess

proxy_program = '/home/jay/gappproxy-read-only/localproxy/proxy.py'

def start_proxy(app_id, port, type_='http'):
    command = ['python', proxy_program, '-t', type_,  '-a', app_id, '-p', port]
    p = subprocess.Popen(command, stderr=open('/dev/null', 'w'), stdout=open('/dev/null', 'w'))
   
if __name__ == '__main__':
    start_proxy('wu-yong', '8001', 'https')
    start_proxy('lu-jun-yi', '8002', 'http')
